/* Shoptet Modern Product Card CSS Override */

/* Reset and base styles */
.product .p {
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    position: relative !important;
    transition: transform 0.3s ease !important;
    border: none !important;
    margin-bottom: 30px !important;
    max-width: 400px !important;
}

.product .p:hover {
    transform: translateY(-5px) !important;
}

/* Image section styling */
.product .p .image {
    display: block !important;
    position: relative !important;
    height: 280px !important;
    background: white !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.product .p .image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    transition: transform 0.3s ease !important;
}

.product .p .image:hover img {
    transform: scale(1.05) !important;
}

/* Tip badge styling */
.product .p .flags {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 2 !important;
}

.product .p .flag.flag-tip {
    background: linear-gradient(135deg, #ffd700 0%, #ffcc00 100%) !important;
    color: #333 !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3) !important;
}

/* Product info container */
.product .p .p-in {
    padding: 25px !important;
    background: white !important;
}

.product .p .p-in-in {
    margin-bottom: 20px !important;
}

/* Product name styling */
.product .p .name {
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 15px !important;
}

.product .p .name span {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #2c3e50 !important;
    line-height: 1.2 !important;
    display: block !important;
}

/* Availability styling - REDESIGNED */
.product .p .availability {
    display: inline-flex !important;
    align-items: center !important;
    background: transparent !important;
    color: #666 !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    border: 1px solid #d0d0d0 !important;
}

/* Remove checkmark */
.product .p .availability::before {
    display: none !important;
}

.product .p .availability-amount {
    margin-left: 5px !important;
    opacity: 0.8 !important;
}

/* Price styling */
.product .p .prices {
    margin-bottom: 15px !important;
}

.product .p .price.price-final {
    margin-bottom: 10px !important;
}

.product .p .price.price-final strong {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #2c3e50 !important;
}

/* Product code styling */
.product .p .p-code {
    font-size: 12px !important;
    color: #95a5a6 !important;
    margin-bottom: 15px !important;
    order: 1 !important;
}

/* Description styling */
.product .p .p-desc {
    color: #5a6c7d !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    font-size: 14px !important;
    order: 2 !important;
}

/* Tools section */
.product .p .p-tools {
    order: 3 !important;
}

/* Add to cart button styling */
.product .p .btn.btn-cart,
.btn.btn-conversion.add-to-cart-button {
    width: 100% !important;
    background: linear-gradient(135deg, #F18635 0%, #e67329 50%, #d65a1f 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
}

.product .p .btn.btn-cart:hover,
.btn.btn-conversion.add-to-cart-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(241, 134, 53, 0.4) !important;
    text-decoration: none !important;
    color: white !important;
}

.product .p .btn.btn-cart:active {
    transform: translateY(0) !important;
}

/* Reorder elements in p-bottom */
.product .p .p-bottom {
    display: flex !important;
    flex-direction: column !important;
}

/* Grid layout for multiple products */
.products-wrapper,
.products-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    padding: 20px !important;
}

/* Special styling for products-top/best selling section */
.products-top,
.products-inline {
    display: flex !important;
    gap: 15px !important;
    overflow-x: auto !important;
    padding: 15px !important;
    scroll-behavior: smooth !important;
}

.products-top .product,
.products-inline .product {
    flex: 0 0 auto !important;
    min-width: 200px !important;
    max-width: 220px !important;
}

.products-top .product .p,
.products-inline .product .p {
    max-width: 100% !important;
    margin-bottom: 0 !important;
}

/* Smaller image height for top products */
.products-top .product .p .image,
.products-inline .product .p .image {
    height: 180px !important;
}

/* Compact padding for top products */
.products-top .product .p .p-in,
.products-inline .product .p .p-in {
    padding: 15px !important;
}

/* Smaller typography for top products */
.products-top .product .p .name span,
.products-inline .product .p .name span {
    font-size: 16px !important;
    line-height: 1.3 !important;
}

.products-top .product .p .price.price-final strong,
.products-inline .product .p .price.price-final strong {
    font-size: 20px !important;
}

/* Compact availability badge for top products */
.products-top .product .p .availability,
.products-inline .product .p .availability {
    padding: 4px 8px !important;
    font-size: 11px !important;
    margin-bottom: 10px !important;
}

/* Smaller product code for top products */
.products-top .product .p .p-code,
.products-inline .product .p .p-code {
    font-size: 10px !important;
    margin-bottom: 10px !important;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .product .p {
        max-width: 100% !important;
        margin: 5px !important;
        overflow: hidden !important; /* Ensure rounded corners are maintained */
    }
    
    /* Increased image heights on mobile for better product visibility */
    .product .p .image {
        height: 220px !important; /* Increased from 160px */
        display: block !important;
        position: relative !important;
        overflow: hidden !important;
        z-index: 1 !important; /* Ensure it stays behind other content */
    }
    
    .product .p .image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 0 !important;
        position: relative !important;
        z-index: 1 !important;
        transition: transform 0.3s ease !important;
    }
    
    .products-top .product .p .image,
    .products-inline .product .p .image {
        height: 160px !important; /* Increased from 120px */
        overflow: hidden !important;
        z-index: 1 !important;
    }
    
    /* Ensure product info stays above image */
    .product .p .p-in {
        padding: 12px !important;
        position: relative !important;
        z-index: 2 !important;
        background: white !important;
    }
    
    .products-top .product .p .p-in,
    .products-inline .product .p .p-in {
        padding: 10px !important;
        position: relative !important;
        z-index: 2 !important;
        background: white !important;
    }
    
    /* Smaller typography on mobile */
    .product .p .name span {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }
    
    .products-top .product .p .name span,
    .products-inline .product .p .name span {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }
    
    .product .p .price.price-final strong {
        font-size: 20px !important;
    }
    
    .products-top .product .p .price.price-final strong,
    .products-inline .product .p .price.price-final strong {
        font-size: 16px !important;
    }
    
    /* More compact availability and code on mobile */
    .product .p .availability {
        padding: 4px 8px !important;
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    .product .p .p-code {
        font-size: 10px !important;
        margin-bottom: 8px !important;
    }
    
    /* Smaller buttons on mobile */
    .product .p .btn.btn-cart,
    .btn.btn-conversion.add-to-cart-button {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    /* Tighter grid on mobile */
    .products-wrapper,
    .products-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    
    /* Smaller cards for mobile top products */
    .products-top .product,
    .products-inline .product {
        min-width: 140px !important;
        max-width: 160px !important;
    }
    
    /* Remove description on mobile for compactness */
    .product .p .p-desc {
        display: none !important;
    }
}